package com.aabte.design.pattern.behavioral.chainnofresponsibility.v1;

import org.apache.commons.lang3.StringUtils;

public class ArticleApprover extends Approver {
    @Override
    public void deploy(Course course) {
        if (StringUtils.isNotEmpty(course.getArticle())) {
            System.out.println(course.getName() + "含有手记，通过!");
            if (null != approver) {
                this.approver.deploy(course);
            }
        } else {
            System.out.println(course.getName() + "不含手记，不通过，流程结束.");
        }
    }
}
